//////////////////////////////////////////////////////////////////////////////
//                                                                          //
//     Filename: SlotsXMLTranslator.h                                       //
//  Create date: June 18, 2004                                              //
//                                                                          //
//////////////////////////////////////////////////////////////////////////////
//                                                                          //
//  Description: This file describes the SlotsXMLTranslator class.          //
//                This class is a protocol translator that translates from  //
//                the RTG Slots server protocol to XML and back.            //
//                                                                          //
//////////////////////////////////////////////////////////////////////////////
//       Copyright (c) 2004 - Realtime Gaming.  All rights reserved.        //
//////////////////////////////////////////////////////////////////////////////

#ifndef __SLOTS_XML_TRANSLATOR__
#define __SLOTS_XML_TRANSLATOR__

#include "XMLTranslator.h"

//////////////////////////////////////////////////////////////////////////////
// SlotsXMLTranslator Class
//////////////////////////////////////////////////////////////////////////////
class SlotsXMLTranslator : public XMLTranslator
{
public:
    SlotsXMLTranslator( Server* pServer, Connection* pParent );
    virtual ~SlotsXMLTranslator();

    // Public Interface
    virtual bool8  TranslateIncomingMessage( uint8* pGameInBuff,  uint32 nGameInBuffSize, uint8* pBuff, uint32 nOutBuffSize );
    virtual uint32 TranslateOutgoingMessage( uint8* pOutBuff, uint32 nOutBuffSize, uint8* pGameOutBuff, uint32 nGameOutBuffSize, uint32 nTotalGameBytes );

protected:
	// Internal Helpers

	// Incoming
	virtual bool8 TranslateInLogin   ( XMLDoc* pDoc, uint8* pGameInBuff,  uint32 nGameInBuffSize );
	virtual bool8 TranslateInSpin    ( XMLDoc* pDoc, uint8* pGameInBuff,  uint32 nGameInBuffSize );
	virtual bool8 TranslateInCustom  ( XMLDoc* pDoc, uint8* pGameInBuff,  uint32 nGameInBuffSize );
	virtual bool8 TranslateInJackpot ( XMLDoc* pDoc, uint8* pGameInBuff,  uint32 nGameInBuffSize );
	virtual bool8 TranslateInIcons   ( XMLDoc* pDoc, uint8* pGameInBuff,  uint32 nGameInBuffSize );
	virtual bool8 TranslateInBonus   ( XMLDoc* pDoc, uint8* pGameInBuff,  uint32 nGameInBuffSize );
	virtual bool8 TranslateInNextSpin( XMLDoc* pDoc, uint8* pGameInBuff,  uint32 nGameInBuffSize );

	// Outgoing
	virtual bool8 TranslateOutLogin        ( uint8* pOutBuff, uint32 nOutBuffSize, uint8* pGameOutBuff, uint32 nGameOutBuffSize );
	virtual bool8 TranslateOutReels        ( uint8* pOutBuff, uint32 nOutBuffSize, uint8* pGameOutBuff, uint32 nGameOutBuffSize );
	virtual bool8 TranslateOutPayouts      ( uint8* pOutBuff, uint32 nOutBuffSize, uint8* pGameOutBuff, uint32 nGameOutBuffSize );
	virtual bool8 TranslateOutPaylines     ( uint8* pOutBuff, uint32 nOutBuffSize, uint8* pGameOutBuff, uint32 nGameOutBuffSize );
	virtual bool8 TranslateOutDenominations( uint8* pOutBuff, uint32 nOutBuffSize, uint8* pGameOutBuff, uint32 nGameOutBuffSize );
	virtual bool8 TranslateOutJackpot      ( uint8* pOutBuff, uint32 nOutBuffSize, uint8* pGameOutBuff, uint32 nGameOutBuffSize );
	virtual bool8 TranslateOutIcons        ( uint8* pOutBuff, uint32 nOutBuffSize, uint8* pGameOutBuff, uint32 nGameOutBuffSize );
	virtual bool8 TranslateOutSubGame      ( uint8* pOutBuff, uint32 nOutBuffSize, uint8* pGameOutBuff, uint32 nGameOutBuffSize );
	virtual bool8 TranslateOutSpin         ( uint8* pOutBuff, uint32 nOutBuffSize, uint8* pGameOutBuff, uint32 nGameOutBuffSize );
	virtual bool8 TranslateOutSave         ( uint8* pOutBuff, uint32 nOutBuffSize, uint8* pGameOutBuff, uint32 nGameOutBuffSize );
	virtual bool8 TranslateOutError        ( uint8* pOutBuff, uint32 nOutBuffSize, uint8* pGameOutBuff, uint32 nGameOutBuffSize );
};

#endif //#ifndef __SLOTS_XML_TRANSLATOR__